//引入公共样式
require('../../assets/css/index.less')

//引入当前样式
require('./ad.less')

//引入动画样式
require('../../assets/css/animate.min.css')

//引入dom.js
const dom = require('../../utils/dom.js')

//等dom加载完毕之后操作dom
window.onload = () => {

    //倒计时跳转
    const miao = dom.$('#miao')
    let time = 5;
    let timer = setInterval(() => {
        if (time === 1) {
            clearInterval(timer)
            window.location.href = './reg.html'
            return
        }
        time--
        miao.innerHTML = `${time}s`
    }, 1000)


    //点击跳过跳转
    dom.$('#box').addEventListener('click', function() {
        window.location.href = './reg.html'
    })


}

onload()